package com.bt7274.config;

/**
 * @Data 2025/6/8 13:09
 * @Author hp
 * @Version 1.0
 * @Description MinIOConfig
 */
import com.bt7274.base.MinIOUtil;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class MinIOConfig {

    @Value("${minio.endpoint}")
    private String endpoint;
    @Value("${minio.fileHost}")
    private String fileHost;
    @Value("${minio.bucketName}")
    private String bucketName;
    @Value("${minio.accessKey}")
    private String accessKey;
    @Value("${minio.secretKey}")
    private String secretKey;

    @Bean
    public MinIOUtil creatMinioClient() {
        return new MinIOUtil(endpoint, fileHost, bucketName, accessKey, secretKey);
    }
}
